/**
 * Progetto PRAISED.
 * 24/gen/2011
 */
package it.uniroma3.dia.praised.core;

import it.uniroma3.dia.praised.core.datasource.DAOProteinName;
import it.uniroma3.dia.praised.core.exception.PersistenceException;
import it.uniroma3.dia.praised.core.facade.DictionaryFacade;
import it.uniroma3.dia.praised.core.model.ProteinName;

import java.util.List;


/**
 * @author Accosta Augusto
 * @author Lopez Elisabetta
 *
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			long start = System.currentTimeMillis();
			List<ProteinName> proteinList = DAOProteinName.doRetrieveAll();
			long end = System.currentTimeMillis();
			System.err.println("DICTIONARY LOADED IN " + (end - start) + " ms");

			String[] array = { "Antifreeze protein type IV", "RNA-recognition motif", "Alcohol dehydrogenase", 
				"Isophentenyl diphosphate isomerase", "mixed lineage leukemia",
				"p21-activated kinase 1", "glycine- and arginine-rich",
				"Nuclear transport factor 2", "toll-like receptors",
				"(RIG-I)-like receptors", "(NOD)-like receptors",
				"mediator of DNA damage checkpoint 1/nuclear factor with BRCT domain protein 1",
				"Service Oriented Architecture (also called", "polimerase g",
				"protein kinase C and casein kinase 2 substrates in neurons",
				"relational database management systems", "casein kinase 2 substrates in neurons", 
				"retinoic acid-inducible gene I", "cyclophilin 33",
				"third plant homeodomain", "choline acetyltransferase",
				"Bin-Amphiphysin-Rvs", "nucleotide oligomerization domain", "AGPAT8", "LPCAT2",
				"PTENP1", "xeroderma pigmentosum", "DNA polymerase g (Polg) a",
				"no clue about Instead mediator of", "AGPAT1", "human ChAT",
				"LPAAT_ and AGPAT8 is also known as AGPAT9", "LCLAT1"};
		
			for (int i = 0; i < 1; i++) { //array.length
				start = System.currentTimeMillis();
				DictionaryFacade.retrieveAndDiscoverProtein(array[i], proteinList);		
				end = System.currentTimeMillis();		
				System.out.println("DONE! " + array[i] + " TIME " + (end-start));
				
			}
		} catch (PersistenceException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
}
